// views/Profile/index.tsx

import React, { useState } from 'react';
import ProfileInfo from './ProfileInfo';
import './Profile.css'; // 导入样式文件

const Profile: React.FC = () => {
  const [showProfile, setShowProfile] = useState(false);

  const handleProfileClick = () => {
    setShowProfile(!showProfile);
  };

  return (
    <div className="profile-container">
      {' '}
      {/* 使用样式布局调整按钮位置 */}
      <button className="profile-button" onClick={handleProfileClick}>
        当前用户个人资料
      </button>
      {showProfile && (
        <ProfileInfo username="guest1145" account="392219358@qq.com" />
      )}
    </div>
  );
};

export default Profile;
